package com.qcby.llmtchstd.controller;

import com.qcby.llmtchstd.common.ResponseResult;
import com.qcby.llmtchstd.entity.exam_result;
import com.qcby.llmtchstd.service.ExamResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/exam-result")
public class ExamResultController {

    @Autowired
    private ExamResultService examResultService;

    @GetMapping("/by-student/{studentId}")
    public ResponseResult<List<exam_result>> getExamResultsByStudent(@PathVariable Integer studentId) {
        return examResultService.getExamResultsByStudentId(studentId);
    }
}